package DatabaseUpdate;

import org.hibernate.Session;

import Watch.DirData;

public class UserManager 
{
	 private Session session = null;
	 //constructor
	 public UserManager(Session session) 
	 {
	  if(session == null)
	    throw new 
	      RuntimeException("Invalid session object.");
	  this.session = session;
	 }
 
	 public void saveDirData(DirData dirData){
	  session.save(dirData);
	 }
	 public void updateDirData(DirData dirData){
	  session.update(dirData);
	 }
	 public void deleteDirData(DirData dirData) {
	  session.delete(dirData);
	 }

	 public Session getSession() {
		return session;
	 }
	
	 public void setSession(Session session) {
		this.session = session;
	 }
}

